package com.oig.sys.base.dto;

import com.oig.common.validator.GroupAdd;
import com.oig.common.validator.GroupEdit;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

@Schema
@Data
public class BankDto {

    @Schema(description = "银行编码", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,编码不能为空", groups={GroupAdd.class, GroupEdit.class})
    @Length(max = 32,min = 1, message = "参数错误,编码1-32位", groups={GroupAdd.class,GroupEdit.class})
    private String bankCode;
    @Schema(description = "银行名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,银行名称不能为空", groups={GroupAdd.class,GroupEdit.class})
    private String bankName;

    @Schema(description = "状态")
    private String status;
}
